﻿
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- saved from url=(0014)about:internet -->
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:mssdk="winsdk" xmlns:script="urn:script" xmlns:build="urn:build" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="Description" content="This bug check has a value of 0x0000009F. This bug check indicates that the driver is in an inconsistent or invalid power state."/>
<meta name="MSHAttr" content="PreferredSiteName:MSDN"/>
<meta name="MSHAttr" content="PreferredLib:/library/windows/hardware"/>
<title>(Developer Content) Bug Check 0x9F: DRIVER_POWER_STATE_FAILURE</title>

<meta name="MS-HAID" content="t05_bugs_60_993bfcef-dfea-4bd1-857c-f4a9b006c5b8.xml"/>


<link rel="STYLESHEET" type="text/css" HREF="../common/backsdk4.css"/>





<style>
html,div { margin: 0; padding: 0;}

body {
	padding: 0px;
	margin: 0px;
	overflow: auto;
	height: 100%;
}

#winchm_template_button{
	float: right;
	width: 93px;
	top: 7px;
	position: relative;
	text-align: right;
	right: 5px;
	height: auto;
}

#winchm_template_top{
	padding: 0px;
	margin: 0px;
	border-bottom: 1px solid #9B9B9B;
	background-color: #B1CEFE;
}

#winchm_template_navigation{
	margin: 0px;
	padding-top: 7px;
	padding-left: 7px;
	padding-bottom: 3px;
	padding-right: 0px;
	font-size: 8.5pt;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
	color: #585858;
}

#winchm_template_title{
	margin: 0px;
	padding-top: 4px;
	padding-left: 7px;
	padding-bottom: 7px;
	padding-right: 0px;
	font-size: 18px; 
	font-family: Verdana, Geneva, sans-serif;
	color: #363636;
}

#winchm_template_content{
	margin-top: 20px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	width: auto  !important;
	width: 100%;
}

#winchm_template_footer{
	border-width: 1px;
	border-color: #B1CEFE;
	border-top-style: solid;
	margin-top: 15px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	padding-top: 7px;
	padding-left: 0px;
	padding-bottom: 0px;
	padding-right: 0px;
	font-family: arial, helvetica, sans-serif;
	font-size: 8.5pt;
	color: #696969;
	width: auto;
	text-align: left;
}


#winchm_template_container{
	margin: 0px;
	padding: 0px;
	position: static;
	padding-bottom: 3px;
	overflow: auto;
	background-color: #FFFFFF;
}


@media print
{
#winchm_template_container{
	position: static;	
	margin: 0px;
	padding: 5px;
	
	width: auto;
	height: auto;
	overflow: auto;
}
#winchm_template_button{
visibility:hidden;
}
}

#winchm_template_navigation A:link	{text-decoration: none; color:#004080}
#winchm_template_navigation A:visited  {text-decoration: none; color: #004080}
#winchm_template_navigation A:active {text-decoration: none; color: #004080 }
#winchm_template_navigation A:hover {text-decoration: none;color: #0080FF}

A:link	{text-decoration: underline; color:#0033CC}
A:visited  {text-decoration: underline; color: #0033CC}
A:active {text-decoration: underline; color: #0033CC }
A:hover {text-decoration: underline;color: #FF0000;}
</style>
<script type="text/javascript">
function isMobile(){
Agent = window.navigator.userAgent;
if (Agent.indexOf("iPhone")>=1 || Agent.indexOf("iPad")>=1 || Agent.indexOf("iPod")>=1 || Agent.indexOf("Android")>=1){
return true;
}else{
return false;	
}

}
function d_onresize(){
if (window.navigator.userAgent.indexOf("MSIE")>=1){
document.getElementById('winchm_template_container').style.pixelWidth = document.body.offsetWidth - 3;
document.getElementById('winchm_template_container').style.pixelHeight = document.body.offsetHeight - document.getElementById('winchm_template_top').offsetHeight - 4;
}
document.getElementById('winchm_template_container').style.top = document.getElementById('winchm_template_top').offsetHeight + 'px';
}

function d_onbeforeprint(){
document.getElementById('winchm_template_container').style.width = 'auto';
document.getElementById('winchm_template_container').style.height = 'auto';
}

function d_onafterprint(){
d_onresize();
}

if(!isMobile()){

window.onload = d_onresize;
window.onresize = d_onresize;
window.onbeforeprint = d_onbeforeprint;
window.onafterprint = d_onafterprint;

document.write("<style>\n");
document.write("body {overflow: hidden;}\n");
document.write("#winchm_template_container {position: absolute;overflow: auto;top : 0px;right: 0px;bottom: 0px;left: 0px;}\n");
document.write("</style>\n");
}

</script>
</head>
<body><script language="JavaScript" type="text/JavaScript">
function syn(){
if(parent.nav.tree){
 if(parent.nav.tree.loaded){
  parent.nav.tree.selectNode(1739);
 }else{
  setTimeout("syn()",500);
}
  }else{
  setTimeout("syn()",500);
  }}
if(parent!=self){
  setTimeout("syn()",100);
}else{
  parent.location.href = "../../index.htm?page=debugger/bug_check_0x9f__driver_power_state_failure.htm";
}
originalOnload = window.onload;
if(originalOnload==null){
window.onload = function(){parent.contentLoaded = true;};
}else{
window.onload = function(){originalOnload();parent.contentLoaded = true;};
}
</script> 


<div id="winchm_template_top">
	<div id="winchm_template_button"><A href="bug_check_0x9e__user_mode_health_monitor.htm" title="Previous topic"><img id="winchm_template_prev" alt="Previous topic" src="../template2/btn_prev_n.gif" border="0"></a><A href="bug_check_0xa0__internal_power_error.htm" title="Next topic"><img id="winchm_template_next" alt="Next topic" src="../template2/btn_next_n.gif" border="0"></a></div>
	<div id="winchm_template_navigation">Help &gt; 
<A href="introduction6.htm">Debugging Tools for Windows (WinDbg, KD, CDB, NTSD)</A> &gt; <A href="bug_checks__blue_screens_.htm">Bug Checks (Blue Screens)</A> &gt; <A href="bug_check_code_reference2.htm">Bug Check Code Reference</A> &gt; </div>
	<div id="winchm_template_title">(Developer Content) Bug Check 0x9F: DRIVER_POWER_STATE_FAILURE</div>
</div>
<div id="winchm_template_container">
	<div id="winchm_template_content"><div id="mainSection"><p>This bug check has a value of 0x0000009F. This bug check indicates that the driver is in an inconsistent or invalid power state.</p>
<p>
<div class="alert"><b>Important </b>This topic is for programmers. If you are a customer who has received a blue screen error code while using your computer, see 
            <a href="http://windows.microsoft.com/en-us/windows-10/troubleshoot-blue-screen-errors" xmlns:loc="http://microsoft.com/wdcml/l10n">Troubleshoot blue screen errors</a>.</div>
</p>
<h2> DRIVER_POWER_STATE_FAILURE Parameters</h2>
<p>The following parameters appear on the blue screen. Parameter 1 indicates the type of violation.</p>
<table>
<tr>
<th>Parameter 1</th>
<th>Parameter 2</th>
<th>Parameter 3</th>
<th>Parameter 4</th>
<th>Cause</th>
</tr>
<tr>
<td>
<p>0x1  </p>
</td>
<td>
<p>The device object</p>
</td>
<td>
<p>Reserved </p>
</td>
<td>
<p>Reserved </p>
</td>
<td>
<p>The device object that is being freed still has an outstanding power request that it has not completed.</p>
</td>
</tr>
<tr>
<td>
<p>0x2  </p>
</td>
<td>
<p>The target device's device object, if it is available </p>
</td>
<td>
<p>The device object</p>
</td>
<td>
<p>The driver object, if it is available </p>
</td>
<td>
<p>The device object completed the I/O request packet (IRP) for the system power state request, but it did not call <b>PoStartNextPowerIrp</b>.</p>
</td>
</tr>
<tr>
<td>
<p>0x3 </p>
</td>
<td>
<p>The physical device object (PDO) of the stack</p>
</td>
<td>
<p>The functional device object (FDO) of the stack. In Windows 7 and later, nt!TRIAGE_9F_POWER.</p>
</td>
<td>
<p>The blocked IRP</p>
</td>
<td>
<p>A device object has been blocking an IRP for too long a time.</p>
</td>
</tr>
<tr>
<td>
<p>0x4 </p>
</td>
<td>
<p>Time-out value, in seconds.</p>
</td>
<td>
<p> The thread currently holding onto the Plug-and-Play (PnP) lock.</p>
</td>
<td>
<p>In Windows 7 and later, nt!TRIAGE_9F_POWER.</p>
</td>
<td>
<p>The power state transition timed out waiting to synchronize with the PnP
              subsystem.</p>
</td>
</tr>
<tr>
<td>
<p>0x500 </p>
</td>
<td>
<p>Reserved </p>
</td>
<td>
<p>The target device's device object, if available </p>
</td>
<td>
<p>Device object </p>
</td>
<td>
<p>The device object completed the IRP for the system power state request, but it did not call <b>PoStartNextPowerIrp</b>.</p>
</td>
</tr>
</table>
<p> </p>
<h2>Cause</h2>
<p>For a description of the possible causes, see the description of each code in the Parameters section.</p>
<p></p>
<p><b>Debugging bug check 0x9F when Parameter 1 equals 0x3</b></p>
<p></p>
<p></p>
<ul>
<li>In a kernel debugger, use the  <a href="#Bookmark2224"><b>!analyze -v</b></a> command to perform the initial bug check analysis. The verbose analysis displays the address of the <b>nt!TRIAGE_9F_POWER</b> structure, which is  in Arg3.<div class="code"><span codelanguage=""><table>
<tr>
<th></th>
</tr>
<tr>
<td>
<pre>kd&gt;!analyze -v
*******************************************************************************
*                                                                             *
*                        Bugcheck Analysis                                    *
*                                                                             *
*******************************************************************************

DRIVER_POWER_STATE_FAILURE (9f)
A driver has failed to complete a power IRP within a specific time.
Arguments:
Arg1: 0000000000000003, A device object has been blocking an Irp for too long a time
Arg2: fffffa8007b13440, Physical Device Object of the stack
Arg3: fffff8000386c3d8, nt!TRIAGE_9F_POWER on Win7 and higher, otherwise the Functional Device Object of the stack
Arg4: fffffa800ab61bd0, The blocked IRP
</pre>
</td>
</tr>
</table></span></div>
<p>The  nt!TRIAGE_9F_POWER structure provides additional bug check   information that might help you determine the cause of this bug check. The structure can provide a list of all outstanding power IRPs,  a list of all power IRP worker threads, and a pointer to the delayed system worker queue. </p>
</li>
<li>Use the  <a href="#Bookmark1991"><b>dt (Display Type)</b></a>  command and specify the nt!TRIAGE_9F_POWER structure using the address from Arg3.<div class="code"><span codelanguage=""><table>
<tr>
<th></th>
</tr>
<tr>
<td>
<pre>
0: kd&gt; dt nt!TRIAGE_9F_POWER fffff8000386c3d8
   +0x000 Signature        : 0x8000
   +0x002 Revision         : 1
   +0x008 IrpList          : 0xfffff800`01c78bd0 _LIST_ENTRY [ 0xfffffa80`09f43620 - 0xfffffa80`0ad00170 ]
   +0x010 ThreadList       : 0xfffff800`01c78520 _LIST_ENTRY [ 0xfffff880`009cdb98 - 0xfffff880`181f2b98 ]
   +0x018 DelayedWorkQueue : 0xfffff800`01c6d2d8 _TRIAGE_EX_WORK_QUEUE
</pre>
</td>
</tr>
</table></span></div>
<p>The <a href="#Bookmark1991"><b>dt (Display Type)</b></a> command displays the structure.  You can use various debugger commands to follow the LIST_ENTRY fields to examine the list of outstanding IRPs and the power IRP worker threads. </p>
</li>
<li>
<p>Use the <a href="#Bookmark2366"><b>!irp</b></a> command to examine the IRP that was blocked. The address of this IRP is in Arg4.</p>
<div class="code"><span codelanguage=""><table>
<tr>
<th></th>
</tr>
<tr>
<td>
<pre>
0: kd&gt; !irp fffffa800ab61bd0
Irp is active with 7 stacks 6 is current (= 0xfffffa800ab61e08)
 No Mdl: No System Buffer: Thread 00000000:  Irp stack trace.  
     cmd  flg cl Device   File     Completion-Context
 [N/A(0), N/A(0)]
            0  0 00000000 00000000 00000000-00000000    

			Args: 00000000 00000000 00000000 00000000
 [N/A(0), N/A(0)]
            0  0 00000000 00000000 00000000-00000000    

			Args: 00000000 00000000 00000000 00000000
 [N/A(0), N/A(0)]
            0  0 00000000 00000000 00000000-00000000    

			Args: 00000000 00000000 00000000 00000000
 [N/A(0), N/A(0)]
            0  0 00000000 00000000 00000000-00000000    

			Args: 00000000 00000000 00000000 00000000
 [N/A(0), N/A(0)]
            0  0 00000000 00000000 00000000-00000000    

			Args: 00000000 00000000 00000000 00000000
&gt;[IRP_MJ_POWER(16), IRP_MN_SET_POWER(2)]
            0 e1 fffffa800783f060 00000000 00000000-00000000    pending
	       \Driver\HidUsb
			Args: 00016600 00000001 00000004 00000006
 [N/A(0), N/A(0)]
            0  0 00000000 00000000 00000000-fffffa800ad00170    

			Args: 00000000 00000000 00000000 00000000


</pre>
</td>
</tr>
</table></span></div>
</li>
<li>
<p>Use the <a href="#Bookmark2323"><b>!devstack</b></a> command with the PDO address in Arg2, to display information associated with the faulting driver.</p>
<div class="code"><span codelanguage=""><table>
<tr>
<th></th>
</tr>
<tr>
<td>
<pre>
0: kd&gt; !devstack fffffa8007b13440
  !DevObj           !DrvObj            !DevExt           ObjectName
  fffffa800783f060  \Driver\HidUsb     fffffa800783f1b0  InfoMask field not found for _OBJECT_HEADER at fffffa800783f030

&gt; fffffa8007b13440  \Driver\usbhub     fffffa8007b13590  Cannot read info offset from nt!ObpInfoMaskToOffset

!DevNode fffffa8007ac8a00 :
  DeviceInst is "USB\VID_04D8&amp;PID_0033\5&amp;46fa7b7&amp;0&amp;1"
  ServiceName is "HidUsb"
</pre>
</td>
</tr>
</table></span></div>
</li>
<li>
<p>Use the !poaction command to display the threads that handle the power operations and any allocated power IRPs.</p>
<div class="code"><span codelanguage=""><table>
<tr>
<th></th>
</tr>
<tr>
<td>
<pre>3: kd&gt; !poaction
PopAction: fffff801332f3fe0
  State..........: 0 - Idle
  Updates........: 0 
  Action.........: None
  Lightest State.: Unspecified
  Flags..........: 10000003 QueryApps|UIAllowed
  Irp minor......: ??
  System State...: Unspecified
  Hiber Context..: 0000000000000000

Allocated power irps (PopIrpList - fffff801332f44f0)
  IRP: ffffe0001d53d8f0 (wait-wake/S0), PDO: ffffe00013cae060
  IRP: ffffe0001049a5d0 (wait-wake/S0), PDO: ffffe00012d42050
  IRP: ffffe00013d07420 (set/D3,), PDO: ffffe00012daf840, CURRENT: ffffe00012dd5040
  IRP: ffffe0001e5ac5d0 (wait-wake/S0), PDO: ffffe00013d33060
  IRP: ffffe0001ed3e420 (wait-wake/S0), PDO: ffffe00013c96060
  IRP: ffffe000195fe010 (wait-wake/S0), PDO: ffffe00012d32050

Irp worker threads (PopIrpThreadList - fffff801332f3100)
  THREAD: ffffe0000ef5d040 (static)
  THREAD: ffffe0000ef5e040 (static), IRP: ffffe00013d07420, DEVICE: ffffe00012dd5040

PopAction: fffff801332f3fe0
  State..........: 0 - Idle
  Updates........: 0 
  Action.........: None
  Lightest State.: Unspecified
  Flags..........: 10000003 QueryApps|UIAllowed
  Irp minor......: ??
  System State...: Unspecified
  Hiber Context..: 0000000000000000

Allocated power irps (PopIrpList - fffff801332f44f0)
  IRP: ffffe0001d53d8f0 (wait-wake/S0), PDO: ffffe00013cae060
  IRP: ffffe0001049a5d0 (wait-wake/S0), PDO: ffffe00012d42050
  IRP: ffffe00013d07420 (set/D3,), PDO: ffffe00012daf840, CURRENT: ffffe00012dd5040
  IRP: ffffe0001e5ac5d0 (wait-wake/S0), PDO: ffffe00013d33060
  IRP: ffffe0001ed3e420 (wait-wake/S0), PDO: ffffe00013c96060
  IRP: ffffe000195fe010 (wait-wake/S0), PDO: ffffe00012d32050

Irp worker threads (PopIrpThreadList - fffff801332f3100)
  THREAD: ffffe0000ef5d040 (static)
  THREAD: ffffe0000ef5e040 (static), IRP: ffffe00013d07420, DEVICE: ffffe00012dd5040
</pre>
</td>
</tr>
</table></span></div>
</li>
<li>If you are working with a KMDF driver, use the <a href="#Bookmark2741">Windows Driver Framework Extensions</a> (!wdfkd) to gather additional information.<p>Use <a href="#Bookmark2764"><b>!wdfkd.wdflogdump</b></a> &lt;your driver name&gt;, to see if KMDF is waiting for you to ACK any pending requests.</p>
<p>Use <a href="#Bookmark2750"><b>!wdfkd.wdfdevicequeues</b></a> &lt;your WDFDEVICE&gt;

to examine all outstanding requests and what state they are in.</p>
</li>
<li>
<p>Use the <a href="#Bookmark2439"><b>!stacks</b></a> extension to examine the state of every thread  and look for a thread that might be 
holding up the power state transition.</p>
</li>
<li>
<p>To help you determine the cause of the error, consider the following questions:  </p>
<ul>
<li>What are the characteristics of the physical device object (PDO) driver (Arg2)? </li>
<li>Can you find the blocked thread? When you examine the thread with the <a href="#Bookmark2443"><b>!thread</b></a> debugger command, what does the thread consist of? 
	</li>
<li>Is there IO associated with the thread that is blocking it?  What symbols are on the stack? </li>
<li>When you examine the blocked power IRP, what do you notice? </li>
<li>What is the  PnP minor function code of the power IRP? </li>
</ul>
</li>
</ul>
<p></p>
<p><b>Debugging bug check 0x9F when Parameter 1 equals 0x4</b></p>
<ul>
<li>In a kernel debugger, use the  <a href="#Bookmark2224"><b>!analyze -v</b></a>  command to perform the initial bug check analysis. The verbose analysis displays the address of the <b>nt!TRIAGE_9F_PNP</b> structure, which is in Parameter 4 (arg4).<div class="code"><span codelanguage=""><table>
<tr>
<th></th>
</tr>
<tr>
<td>
<pre>kd&gt; !analyze -v
*******************************************************************************
*                                                                             *
*                        Bugcheck Analysis                                    *
*                                                                             *
*******************************************************************************

DRIVER_POWER_STATE_FAILURE (9f)
A driver has failed to complete a power IRP within a specific time (usually 10 minutes).
Arguments:
Arg1: 00000004, The power transition timed out waiting to synchronize with the Pnp
        subsystem.
Arg2: 00000258, Timeout in seconds.
Arg3: 84e01a70, The thread currently holding on to the Pnp lock.
Arg4: 82931b24, nt!TRIAGE_9F_PNP on Win7

 </pre>
</td>
</tr>
</table></span></div>
<p>The  nt!TRIAGE_9F_PNP structure provides additional bug check   information that might help you  determine the cause of the error. The nt!TRIAGE_9F_PNP structure provides a pointer to a structure that contains  the list of dispatched (but not completed) PnP IRPs and provides a pointer to  the delayed system worker queue. </p>
</li>
<li>Use the  <a href="#Bookmark1991"><b>dt (Display Type)</b></a>  command and specify the <b>nt!TRIAGE_9F_PNP</b> structure and the address that you found in Arg4.<div class="code"><span codelanguage=""><table>
<tr>
<th></th>
</tr>
<tr>
<td>
<pre>
kd&gt; dt nt!TRIAGE_9F_PNP 82931b24
   +0x000 Signature        : 0x8001
   +0x002 Revision         : 1
   +0x004 CompletionQueue  : 0x82970e20 _TRIAGE_PNP_DEVICE_COMPLETION_QUEUE
   +0x008 DelayedWorkQueue : 0x829455bc _TRIAGE_EX_WORK_QUEUE

</pre>
</td>
</tr>
</table></span></div>
<p>The <a href="#Bookmark1991"><b>dt (Display Type)</b></a> command displays the structure.  You can use debugger commands to follow the LIST_ENTRY fields to examine the list of outstanding PnP IRPs.  </p>
<p>To help you determine the cause of the error, consider the following questions:</p>
<ul>
<li>Is there an IRP associated with the thread?

</li>
<li>Is there any IO in the CompletionQueue?</li>
<li>  What symbols are on the stack?</li>
</ul>
</li>
<li>
<p>Refer to the additional techniques described above under parameter 0x3.</p>
</li>
</ul>
<p></p>
<h2>Resolution</h2>
<p></p>
<p>If you are not equipped to debug this problem using the techniques described above, you can use some basic troubleshooting techniques. </p>
<ul>
<li>
<p>If you recently added hardware to the system, try removing or replacing it. Or check with the manufacturer to see if any patches are available.</p>
</li>
<li>
<p>If new device drivers or system services have been added recently, try removing or updating them. Try to determine what changed in the system that caused the new bug check code to appear.</p>
</li>
<li>
<p>Look in <b>Device Manager</b> to see if any devices are marked with the exclamation point (!). Review the events log displayed in driver properties for any faulting driver.  Try updating the related driver.  </p>
</li>
<li>
<p>Check the System Log in Event Viewer for additional error messages that might help pinpoint the device or driver that is causing the error. For more information, see <a href="http://windows.microsoft.com/en-us/windows/what-information-event-logs-event-viewer#1TC=windows-7">Open Event Viewer</a>. Look for critical errors in the system log that occurred in the same time window as the blue screen.</p>
</li>
<li>
<p>To try and isolate the cause, temporally disable power save using control panel, power options. Some driver issues are related to the various states of system hibernation and the suspending and resumption of power.  </p>
</li>
<li>
<p>You can try running the hardware diagnostics supplied by the system manufacturer. </p>
</li>
<li>
<p>Check with the manufacturer to see if an updated system BIOS or firmware is available. </p></li></ul></div></div>	
	<div id="winchm_template_footer">Copyright &copy; 2019. All rights 
reserved. (To change the copyright info, just edit it in template.)</div>
</div>

</body>
</html>
